package com.biz.service.HService.jobManage;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.biz.model.Pmodel.job.MgroupQuartzManage;
import com.biz.model.common.Pager;
import com.biz.service.HService.sys.BaseServiceImpl;
import com.framework.dao.mdao.DaoSupport;

@Service("jobManageService")
public class JobManageServiceImpl extends BaseServiceImpl<MgroupQuartzManage> implements JobManageServiceI {
	@Resource(name = "daoSupport")
	private DaoSupport dao;

	@Override
	public Pager<MgroupQuartzManage> findMgroupQuartz(Pager pager) throws Exception {
		Pager<MgroupQuartzManage> pager_back=
				(Pager<MgroupQuartzManage>)dao.findForPager1("MgroupQuartzManageMapper.findMgroupQuartz","MgroupQuartzManageMapper.countMgroupQuartz", pager);
		return pager_back;
	}

	@Override
	public List<String> getAllJobGroup() throws Exception {
		return (List<String>)dao.findForList("MgroupQuartzManageMapper.getAllJobGroup",null);
	}

	@Override
	public MgroupQuartzManage getMGroupQuartzById(String id)
			throws Exception {
		return (MgroupQuartzManage)dao.findForObject("MgroupQuartzManageMapper.getMGroupQuartzById",id);
	}

	@Override
	public boolean updateMGroupQuartzStatuById(Map<String, Object> param)
			throws Exception {
		return (int)dao.update("MgroupQuartzManageMapper.updateMGroupQuartzStatuById",param)>0;
	}

	@Override
	public boolean delMGroupQuartzStatuById(Map<String, Object> param) throws Exception {
		return (int)dao.update("MgroupQuartzManageMapper.delMGroupQuartzStatuById",param)>0;
	}

}
